Scanning depth engine

ABSTRACT

Mapping apparatus includes a transmitter, which emits a beam comprising pulses of light, and a scanner, which is configured to scan the beam, within a predefined scan range, over a scene. A receiver receives the light reflected from the scene and to generate an output indicative of a time of flight of the pulses to and from points in the scene. A processor is coupled to control the scanner so as to cause the beam to scan over a selected window within the scan range and to process the output of the receiver so as to generate a 3D map of a part of the scene that is within the selected window.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.13/766,801, filed Feb. 14, 2013, which claims the benefit of U.S.Provisional Patent Application 61/598,921, filed Feb. 15, 2012, which isincorporated herein by reference. This application is related to U.S.patent application Ser. No. 13/766,811, filed Feb. 14, 2013, entitled“Integrated Optoelectronic Modules” (now U.S. Pat. No. 9,157,790).

FIELD OF THE INVENTION

The present invention relates generally to methods and devices forprojection and capture of optical radiation, and particularly to optical3D mapping.

BACKGROUND

Various methods are known in the art for optical 3D mapping, i.e.,generating a 3D profile of the surface of an object by processing anoptical image of the object. This sort of 3D profile is also referred toas a 3D map, depth map or depth image, and 3D mapping is also referredto as depth mapping.

U.S. Patent Application Publication 2011/0279648 describes a method forconstructing a 3D representation of a subject, which comprisescapturing, with a camera, a 2D image of the subject. The method furthercomprises scanning a modulated illumination beam over the subject toilluminate, one at a time, a plurality of target regions of the subject,and measuring a modulation aspect of light from the illumination beamreflected from each of the target regions. A moving-mirror beam scanneris used to scan the illumination beam, and a photodetector is used tomeasure the modulation aspect. The method further comprises computing adepth aspect based on the modulation aspect measured for each of thetarget regions, and associating the depth aspect with a correspondingpixel of the 2D image.

U.S. Pat. No. 8,018,579 describes a three-dimensional imaging anddisplay system in which user input is optically detected in an imagingvolume by measuring the path length of an amplitude modulated scanningbeam as a function of the phase shift thereof. Visual image userfeedback concerning the detected user input is presented.

U.S. Pat. No. 7,952,781, whose disclosure is incorporated herein byreference, describes a method of scanning a light beam and a method ofmanufacturing a microelectromechanical system (MEMS), which can beincorporated in a scanning device.

U.S. Patent Application Publication 2012/0236379 describes a LADARsystem that uses MEMS scanning. A scanning mirror includes a substratethat is patterned to include a mirror area, a frame around the mirrorarea, and a base around the frame. A set of actuators operate to rotatethe mirror area about a first axis relative to the frame, and a secondset of actuators rotate the frame about a second axis relative to thebase. The scanning mirror can be fabricated using semiconductorprocessing techniques. Drivers for the scanning mirror may employfeedback loops that operate the mirror for triangular motions. Someembodiments of the scanning mirror can be used in a LADAR system for aNatural User Interface of a computing system.

The “MiniFaros” consortium, coordinated by SICK AG (Hamburg, Germany)has supported work on a new laser scanner for automotive applications.Further details are available on the minifaros.eu Web site.

SUMMARY

Embodiments of the present invention that are described hereinbelowprovide improved apparatus and methods for depth mapping using ascanning beam.

There is therefore provided, in accordance with an embodiment of thepresent invention, mapping apparatus, including a transmitter, which isconfigured to emit a beam including pulses of light, and a scanner,which is configured to scan the beam, within a predefined scan range,over a scene. A receiver is configured to receive the light reflectedfrom the scene and to generate an output indicative of a time of flightof the pulses to and from points in the scene. A processor is coupled tocontrol the scanner so as to cause the beam to scan over a selectedwindow within the scan range and to process the output of the receiverso as to generate a 3D map of a part of the scene that is within theselected window.

In some embodiments, the processor is configured to select a differentwindow to scan in each scan of the beam. The processor may be configuredto process the output of the receiver during a first scan, which maycover the entire scan range of the scanner, so as to generate a first 3Dmap of the scene, and to select the window to scan preferentially duringa second scan responsively to a feature of the first 3D map.

The processor may be configured to identify an object in the first 3Dmap, and to define the window so as to contain the identified object. Ina disclosed embodiment, the object includes at least a part of a body ofa user of the apparatus, and the processor is configured to identify thepart of the body responsively to a gesture made by the user during thefirst scan.

In one embodiment, the processor is configured to drive the scanner toscan the selected window with a resolution that is enhanced relative tothe first scan. Alternatively or additionally, the processor isconfigured to drive the scanner to scan the second window at a framerate that is higher than during the first scan. For at least some scans,the selected window need not be centered within the predefined scanrange.

In some embodiments, the scanner includes a micromirror produced usingmicro-electro-mechanical systems (MEMS) technology, and the transmitteris configured to direct the beam to reflect from the micromirror towardthe scene. The micromirror may be configured to rotate about two axes,wherein the processor is coupled to control a range of rotation of themicromirror about at least one of the axes in order to define thewindow.

Additionally or alternatively, the processor may be coupled to vary aspeed of rotation of the micromirror about at least one of the axes inorder to define the window. In one such embodiment, a range of therotation of the micromirror is the same in both the first and secondscans, and the processor is coupled to vary the speed of the rotationabout the at least one of the axes during the second scan so that thespeed of scanning of the micromirror over the selected window is slowerthan over other parts of the range.

In some embodiments, the scanner includes a substrate, which is etchedto define the micromirror and a support, along with first spindlesconnecting the micromirror to the support along a first axis and secondspindles connecting the support to the substrate along a second axis. Anelectromagnetic drive causes the micromirror and the support to rotateabout the first and second spindles. The electromagnetic drive mayinclude a stator assembly, including at least one magnetic core havingan air gap and at least one coil wound on the magnetic core, and atleast one rotor, on which the micromirror and the support are mountedand which is suspended in the air gap so as to move within the air gapin response to a current driven through the at least one coil. In adisclosed embodiment, the at least one magnetic core and the at leastone rotor include two cores and two rotors suspended in respective airgaps of the cores, and the electromagnetic drive is configured to drivecoils on the two cores with differential currents so as to cause themicromirror and the support to rotate at different, respective speeds sothat the micromirror scans in a raster pattern.

In some embodiments, the electromagnetic drive causes the micromirror torotate about the first spindles at a first frequency, which is aresonant frequency of rotation, while causing the support to rotateabout the second spindles at a second frequency, which is lower than thefirst frequency and may not be a resonant frequency. In a disclosedembodiment, the support includes a first support, which is connected bythe first spindles to the micromirror, a second support, which isconnected by the second spindles to the substrate, and third spindles,connecting the first support to the second support, wherein theelectromagnetic drive is configured to cause the first support to rotaterelative to the second support about the third spindles.

Typically, the receiver includes a detector, which is configured toreceive the reflected light from the scene via the micromirror. In adisclosed embodiment, the apparatus includes a beamsplitter, which ispositioned so as to direct the beam emitted by the transmitter towardthe micromirror, while permitting the reflected light to reach thedetector, wherein the emitted beam and the reflected light haverespective optical axes, which are parallel between the beamsplitter andthe micromirror. The beamsplitter may be patterned with a polarizingreflective coating over only a part of a surface of the beamsplitter,and may be positioned so that the patterned part of the surfaceintercepts the beam from the transmitter and reflects the beam towardthe micromirror. Optionally, the beamsplitter may include a bandpasscoating on a reverse side of the beamsplitter, configured to preventlight outside an emission band of the transmitter from reaching thereceiver. The transmitter and the receiver may be mounted together onthe micro-optical substrate in a single integrated package.

In a disclosed embodiment, the processor is configured to variablycontrol a power level of the pulses emitted by the transmitterresponsively to a level of the output from the receiver in response toone or more previous pulses.

There is additionally provided, in accordance with an embodiment of thepresent invention, a method for mapping, which includes operating ascanner so as to scan a beam including pulses of light, within apredefined scan range, over a scene. The light reflected from the sceneis received, and an output is generated indicative of a time of flightof the pulses to and from points in the scene. The scanner iscontrolled, during operation of the scanner, so as to cause the beam toscan preferentially over a selected window within the scan range. Theoutput of the receiver is processed so as to generate a 3D map of a partof the scene that is within the selected window.

There is furthermore provided, in accordance with an embodiment of thepresent invention, mapping apparatus, which includes a transmitter,which is configured to emit a beam including pulses of light, and ascanner, which is configured to scan the beam over a scene. A receiveris configured to receive the light reflected from the scene and togenerate an output indicative of a time of flight of the pulses to andfrom points in the scene. A processor is coupled to process the outputof the receiver during a first scan of the beam so as to generate a 3Dmap of the scene, while controlling a power level of the pulses emittedby the transmitter responsively to a level of the output from thereceiver in response to one or more previous pulses.

Typically, the processor is configured to control the power level of thepulses so as to reduce variations in an intensity of the reflected lightthat is received from different parts of the scene. The one or moreprevious pulses may include scout pulses emitted by the transmitter inorder to assess and adjust the power level.

The present invention will be more fully understood from the followingdetailed description of the embodiments thereof, taken together with thedrawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic, pictorial illustration of a depth mapping system,in accordance with an embodiment of the present invention;

FIG. 2 is a block diagram that schematically shows functional componentsof a depth engine, in accordance with an embodiment of the presentinvention;

FIG. 3 is a schematic, pictorial illustration of an optical scanninghead, in accordance with an embodiment of the present invention;

FIG. 4 is a schematic, pictorial illustration of a MEMS scanner, inaccordance with an embodiment of the present invention;

FIG. 5 is a schematic, pictorial illustration of a micromirror unit, inaccordance with another embodiment of the present invention;

FIGS. 6A and 6B are schematic side view of optoelectronic modules, inaccordance with embodiments of the present invention;

FIG. 7 is a schematic side view of an optoelectronic module, inaccordance with another embodiment of the present invention;

FIGS. 8A and 8B are schematic side views of an optoelectronic module, inaccordance with yet another embodiment of the present invention;

FIG. 9 is a schematic side view of a beam combiner, in accordance withan embodiment of the present invention;

FIGS. 10A and 10B are schematic side views of an optoelectronic module,in accordance with still another embodiment of the present invention;

FIG. 11A is a schematic side view of a beam transmitter, in accordancewith an embodiment of the present invention;

FIGS. 11B and 11C are schematic side and rear views, respectively, of abeam generator, in accordance with an embodiment of the presentinvention;

FIG. 11D is a schematic side view of a beam generator, in accordancewith an alternative embodiment of the present invention;

FIG. 12A is a schematic side view of a beam transmitter, in accordancewith another embodiment of the present invention;

FIGS. 12B and 12C are schematic side and rear views, respectively, of abeam generator, in accordance with another embodiment of the presentinvention; and

FIGS. 13-15 are schematic side views of optoelectronic modules, inaccordance with further embodiments of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

PCT International Publication WO 2012/020380, which is assigned to theassignee of the present patent application and whose disclosure isincorporated herein by reference, describes apparatus for mapping, whichincludes an illumination module. This module includes a radiationsource, which is configured to emit a beam of radiation, and a scanner,which is configured to receive and scan the beam over a selected angularrange. Illumination optics project the scanned beam so as to create apattern of spots extending over a region of interest. An imaging modulecaptures an image of the pattern that is projected onto an object in theregion of interest. A processor processes the image in order toconstruct a three-dimensional (3D) map of the object.

In contrast to such image-based mapping systems, some embodiments of thepresent invention that are described hereinbelow provide depth enginesthat generate 3D mapping data by measuring the time of flight of ascanning beam. A light transmitter, such as a laser, directs shortpulses of light toward a scanning mirror, which scans the light beamover a scene of interest within a certain scan range. A receiver, suchas a sensitive, high-speed photodiode (for example, an avalanchephotodiode) receives light returned from the scene via the same scanningmirror. Processing circuitry measures the time delay between thetransmitted and received light pulses at each point in the scan. Thisdelay is indicative of the distance traveled by the light beam, andhence of the depth of the object at the point. The processing circuitryuses the depth data thus extracted in producing a 3D map of the scene.

Systems based on this sort of depth engine are able to provide dynamic,interactive zooming functionality. The scanner can be controlled so asto cause the beam to scan over a selected window within the scan rangeand thus generate a 3D map of a part of the scene that is within theselected window. A different window may be selected in each scan of thebeam. For example, after first scanning over a wide angular range andcreating a wide-angle, low-resolution 3D map of the scene of interest(possibly scanning the entire range), the depth engine may be controlledto zoom in on particular windows or objects that have been identifiedwithin the scene. Zooming in this manner enables the depth engine toprovide data within the selected window at higher resolution or,alternatively or additionally, to increase the frame rate at which itscans.

System Description

FIG. 1 is a schematic, pictorial illustration of a depth mapping system20, in accordance with an embodiment of the present invention. Thesystem is based on a scanning depth engine 22, which captures 3D sceneinformation in a volume of interest (VOI) 30 that includes one or moreobjects. In this example, the objects comprise at least parts of thebodies of users 28. Engine 22 outputs a sequence of frames containingdepth data to a computer 24, which processes and extracts high-levelinformation from the map data. This high-level information may beprovided, for example, to an application running on computer 24, whichdrives a display screen 26 accordingly.

Computer 24 processes data generated by engine 22 in order toreconstruct a depth map of VOI 30 containing users 28. In oneembodiment, engine 22 emits pulses of light while scanning over thescene and measures the relative delay of the pulses reflected back fromthe scene. A processor in engine 22 or in computer 24 then computes the3D coordinates of points in the scene (including points on the surfaceof the users' bodies) based on the time of flight of the light pulses ateach measured point (X,Y) in the scene. This approach is advantageous inthat it does not require the users to hold or wear any sort of beacon,sensor, or other marker. It gives the depth (Z) coordinates of points inthe scene relative to the location of engine 22 and permits dynamiczooming and shift of the region that is scanned within the scene.Implementation and operation of the depth engine are described ingreater detail hereinbelow.

Although computer 24 is shown in FIG. 1, by way of example, as aseparate unit from depth engine 22, some or all of the processingfunctions of the computer may be performed by a suitable microprocessorand software or by dedicated circuitry within the housing of the depthengine or otherwise associated with the depth engine. As anotheralternative, at least some of these processing functions may be carriedout by a suitable processor that is integrated with display screen 26(in a television set, for example) or with any other suitable sort ofcomputerized device, such as a game console or media player. The sensingfunctions of engine 22 may likewise be integrated into computer 24 orother computerized apparatus that is to be controlled by the depthoutput.

For simplicity and clarity in the description that follows, a set ofCartesian axes is marked in FIG. 1. The Z-axis is taken to be parallelto the optical axis of depth engine 22. The frontal plane of the depthengine is taken to be the X-Y plane, with the X-axis as the horizontal.These axes, however, are defined solely for the sake of convenience.Other geometrical configurations of the depth engine and its volume ofinterest may alternatively be used and are considered to be within thescope of the present invention.

FIG. 1 illustrates the zoom capabilities of depth engine 22. Initially,a beam 38 emitted by engine 22 scans the entire VOI 30 and generates alow-resolution depth map of the entire scene. The scan range may belarge, as shown in the figure, for example 120° (X)×80° (Y). (Referencesto the “scan range” in the present description mean the full range overwhich the mapping system is intended to operate, which may be smallerthan the total range over which the scanner in depth engine 22 isphysically capable of scanning.) Computer 24 identifies users 28 andinstructs engine 22 to narrow its scan range to a window 32 containingthe users, and thus generate a higher-resolution depth map of theobjects in the window. Optionally, computer 24 may instruct engine 22 tozoom in still farther on specific parts or features of the users' facesand bodies, as exemplified by windows 34 and 36. The instructions andtheir execution by engine 22 may be dynamic, i.e., computer 24 mayinstruct engine 22 to modify the scan window during operation of thescanner. Thus, for example, the locations of the windows may change fromframe to frame in response to movement of the users or other changes inthe scene or application requirements. As shown in the figure, thewindows need not be centered within the scan range and can be locatedpractically anywhere within the range.

These dynamic zoom functions are implemented by controlling the scanrange of engine 22. Typically, engine 22 scans VOI 30 in a rasterpattern. For example, to generate window 32, the X-range of the rasterscan is reduced, while the Y-range remains unchanged. This sort ofwindowing can be conveniently accomplished when the depth engine scansrapidly in the Y-direction, in a resonant scan with a fixed amplitudeand frequency (such as 5-10 kHz), while scanning more slowly in theX-direction at the desired frame rate (such as 30 Hz). The X-directionscan is not a resonant frequency of rotation. Thus, the speed of theX-direction scan can be varied over the scan range so that each framecontains multiple vertical windows, such as scanning a respective windowover each of users 28 while skipping over the space between them. Asanother alternative, the Y-range of the scan may be reduced, thusreducing the overall vertical field of view.

Additionally or alternatively, the Y-range of the scan may becontrolled, as well, thus giving scan windows 34 and 36 with differentranges in both X and Y. Furthermore, the Y- and/or X-range and X-offsetof the scan may be modulated during each frame, so that non-rectangularwindows may be scanned.

Computer 24 may instruct depth engine 22 to change the zoom (i.e., tochange the sizes and/or locations of the zoom windows) via a commandinterface provided by the depth engine. The computer may run anapplication program interface (API) and/or suitable middleware so thatapplication programs running on the computer can invoke the commandinterface.

Various zoom control models can be implemented by the computer or,alternatively or additionally, by embedded software in depth engine 22.As noted earlier, the computer or depth engine may change the zoom onthe fly based on analysis of the depth map. Initially, the depth engineand computer may operate in a wide-angle, low-resolution search mode,and may then zoom into a higher-resolution tracking mode when a user isidentified in the scene. For example, when a user enters the scene, thecomputer may detect the presence and location of the user and instructthe depth engine to zoom in on his location. When the user then makes acertain gesture, the computer may detect the gesture and instruct thedepth engine to zoom in further on the user's hand.

Scanning mirror designs and other details of the depth engine thatsupport the above sorts of schemes are described with reference to thefigures that follow.

FIG. 2 is a block diagram that schematically shows functional componentsof depth engine 22, in accordance with an embodiment of the presentinvention. Engine 22 comprises an optical head 40 and a controller 42(also referred to as a processor), which may be implemented as anapplication-specific integrated circuit (ASIC), as indicated in thefigure.

Optical head 40 comprises a transmitter 44, such as a laser diode, whoseoutput is collimated by a suitable lens. Transmitter 44 outputs a beamof light, which may comprise visible, infrared, and/or ultravioletradiation (all of which are referred to as “light” in the context of thepresent description and in the claims). A laser driver, which maysimilarly be implemented in an ASIC 53, modulates the laser output, sothat it emits short pulses, typically with sub-nanosecond rise time. Thelaser beam is directed toward a scanning micromirror 46, which may beproduced and driven using MEMS technology, as described below. Themicromirror scans beam 38 over the scene, typically viaprojection/collection optics, such as a suitable lens (shown in thefigures below).

Pulses of light reflected back from the scene are collected by theoptics and reflect from scanning mirror onto a receiver 48.(Alternatively, in place of a single mirror shared by the transmitterand the receiver, a pair of synchronized mirrors may be used, one forthe transmitter and the other for the receiver, while still supportingthe interactive zooming capabilities of engine 22.) The receivertypically comprises a sensitive, high-speed photodetector, such as anavalanche photodiode (APD), along with a sensitive amplifier, such as atransimpedance amplifier (TIA), which amplifies the electrical pulsesoutput by the photodetector. These pulses are indicative of the times offlight of the corresponding pulses of light.

The pulses that are output by receiver 48 are processed by controller 42in order to extract depth (Z) values as a function of scan location(X,Y). For this purpose, the pulses may be digitized by a high-speedanalog/digital converter (A2D) 56, and the resulting digital values maybe processed by depth processing logic 50. The corresponding depthvalues may be output to computer 24 via a USB port 58 or other suitableinterface.

In some cases, particularly near the edges of objects in the scene, agiven projected light pulse may result in two reflected light pulsesthat are detected by receiver 48—a first pulse reflected from the objectitself in the foreground, followed by a second pulse reflected from thebackground behind the object. Logic 50 may be configured to process bothpulses, giving two depth values (foreground and background) at thecorresponding pixel. These dual values may be used by computer 24 ingenerating a more accurate depth map of the scene.

Controller 42 also comprises a power converter 57, to provide electricalpower to the components of engine 22, and controls the transmit,receive, and scanning functions of optical head 40. For example, a MEMScontrol circuit 52 in controller 42 may direct commands to the opticalhead to modify the scanning ranges of mirror 46, as explained above.Position sensors associated with the scanning mirror, such as suitableinductive or capacitive sensors (not shown), may provide positionfeedback to the MEMS control function. A laser control circuit 54 and areceiver control circuit 55 likewise control aspects of the operation oftransmitter 44 and receiver 48, such as amplitude, gain, offset, andbias.

The laser driver in ASIC 53 and/or laser control circuit 54 may controlthe output power of transmitter 44 adaptively, in order to equalize thelevel of optical power of the pulses that are incident on receiver 48.This adaptation compensates for variations in the intensity of thereflected pulses that occurs due to variations in the distance andreflectivity of objects in different parts of the scene from which thelight pulses are reflected. It is thus useful in improving signal/noiseratio while avoiding detector saturation. For example, the power of eachtransmitted pulse may be adjusted based on the level of the output fromreceiver in response to one or more previous pulses, such as thepreceding pulse or pulses emitted by the transmitter in the presentscan, and/or the pulse at this X,Y position of mirror 46 in thepreceding scan. Optionally, the elements of optical head 40 may beconfigured to transmit and receive “scout pulses,” at full or partialpower, for the purpose of assessing returned power or object distance,and may then adjust the output of transmitter 44 accordingly.

Optical Scanning Head

FIG. 3 is a schematic, pictorial illustration showing elements ofoptical head 40, in accordance with an embodiment of the presentinvention. Transmitter 44 emits pulses of light toward a polarizingbeamsplitter 60. Typically, only a small area of the beamsplitter,directly in the light path of transmitter 60, is coated for reflection,while the remainder of the beamsplitter is fully transparent (or evenanti-reflection coated) to permit returned light to pass through toreceiver 48. The light from transmitter 44 reflects off beamsplitter andis then directed by a folding mirror 62 toward scanning micromirror 46.A MEMS scanner 64 scans micromirror 46 in X- and Y-directions with thedesired scan frequency and amplitude. Details of the micromirror andscanner are shown in the figures that follow.

Light pulses returned from the scene strike micromirror 46, whichreflects the light via turning mirror 62 through beamsplitter 60.Receiver 48 senses the returned light pulses and generates correspondingelectrical pulses. To enhance sensitivity of detection, the overall areaof beamsplitter 60 and the aperture of receiver 48 are considerablylarger than the area of the transmitted beam, and the beamsplitter isaccordingly patterned, i.e., the reflective coating extends over onlythe part of its surface on which the transmitted beam is incident. Thereverse side of the beamsplitter may have a bandpass coating, to preventlight outside the emission band of transmitter 44 from reaching thereceiver. It is also desirable that micromirror 46 be as large aspossible, within the inertial constraints imposed by the scanner. Forexample, the area of the micromirror may be about 10-15 mm².

The specific mechanical and optical designs of the optical head shown inFIG. 3 are described here by way of example, and alternative designsimplementing similar principles are considered to be within the scope ofthe present invention. Other examples of optoelectronic modules that canbe used in conjunction with a scanning micromirror are describedhereinbelow.

FIG. 4 is a schematic, pictorial illustration of MEMS scanner 64, inaccordance with an embodiment of the present invention. This scanner isproduced and operates on principles similar to those described in theabove-mentioned U.S. Pat. No. 7,952,781, but enables two-dimensionalscanning of a single micromirror 46. Dual-axis MEMS-based scanners ofthis type are described further in U.S. Provisional Patent Application61/675,828, filed Jul. 26, 2012, which is incorporated herein byreference. Alternative embodiments of the present invention, however,may use scanners of other types that are known in the art, includingdesigns that use two single-axis scanners (such as those described inU.S. Pat. No. 7,952,781, for example).

Micromirror 46 is produced by suitably etching a semiconductor substrate68 to separate the micromirror from a support 72, and to separate thesupport from the remaining substrate 68. After etching, micromirror 46(to which a suitable reflective coating is applied) is able to rotate inthe Y-direction relative to support 72 on spindles 70, while support 72rotates in the X-direction relative to substrate 68 on spindles 74.

Micromirror 46 and support 72 are mounted on a pair of rotors 76, whichcomprise permanent magnets. (Only one of the rotors is visible in thefigure.) Rotors 76 are suspended in respective air gaps of magneticcores 78. Cores 78 are wound with respective coils 80 of conductivewire, thus creating an electromagnetic stator assembly. (Although asingle coil per core is shown in FIG. 4 for the sake of simplicity, twoor more coils may alternatively be wound on each core; and differentcore shapes may also be used.) Driving an electrical current throughcoils 80 generates a magnetic field in the air gaps, which interactswith the magnetization of rotors 76 so as to cause the rotors to rotateor otherwise move within the air gaps.

Specifically, coils 80 may be driven with high-frequency differentialcurrents so as to cause micromirror 46 to rotate resonantly back andforth about spindles 70 at high speed (typically in the range of 5-10kHz, as noted above, although higher or lower frequencies may also beused). This resonant rotation generates the high-speed Y-directionraster scan of the output beam from engine 22. At the same time, coils80 are driven together at lower frequency to drive the X-direction scanby rotation of support 72 about spindles 74 through the desired scanrange. The X- and Y-rotations together generate the overall raster scanpattern of micromirror 46.

FIG. 5 is a schematic, pictorial illustration of a micromirror unit 82,in accordance with another embodiment of the present invention. Assembly82 may be produced and operated using MEMS technology in a mannersimilar to that described above with reference to scanner 64. In thisembodiment, micromirror 46 is connected by spindles 84 to a Y-support86, which is connected by spindles 88 to an X-support 90. The X-supportis connected by spindles 92 to a substrate (not shown in this figure).Micromirror 46 rotates resonantly back and forth at high frequency onspindles 84, thus generating the high-speed Y-direction scan describedabove. Y- and X-supports 86 and 90 rotate at lower speed, with variableamplitude and offset, to define the X-Y windows over which assembly 82will scan. This arrangement may be used conveniently, for example, togenerate a scan over windows 34 and 36, as shown in FIG. 1.

The particular MEMS-based scanners shown in FIGS. 4 and 5 are describedhere by way of example. In alternative embodiments, other types of MEMSscanners may be used in depth engine 22, as well as suitable scannersbased on other scanning technologies. All such implementations areconsidered to be within the scope of the present invention.

Various scan modes can be enabled by applying appropriate drive signalsto the sorts of micromirror-based scanners that are described above. Thepossibility of zooming in on particular windows was already mentionedabove. As noted earlier, even when the entire field of view is scanned,the X-direction scan rate may be varied over the course of the scan togive higher resolution within one or more regions, by scanning themicromirror relatively slowly over these regions, while scanning theremainder of the scene at a faster rate. These high-resolution scans ofparticular regions can be interlaced, frame by frame, withlow-resolution scans over the entire scene by maintaining a fixedX-direction scan rate as the micromirror scans over the scene in onedirection (for example, scanning from left to right) to give thelow-resolution depth map, and varying the X-direction scan rate betweenfast and slow while scanning in the reverse direction (on the returnscan from right to left) to map the high-resolution window. Other sortsof variable, interlaced scan patterns may similarly be implemented byapplication of suitable drive signals.

Optoelectronic Modules

Assembly of optical head 40 from discrete optical and mechanicalcomponents, as shown in FIG. 3, requires precise alignment and can becostly. In alternative embodiments, all parts requiring preciseplacement and alignment (such as the light transmitter, receiver, andassociated optics) may be combined in a single integrated, modularpackage on micro-optical substrate, such as a silicon optical bench(SiOB) or other type of micro-optical bench based on a semiconductor orceramic substrate, such as alumina, aluminum nitride, or glass (Pyrex®).This approach can save costs and may make the depth engine easier tohandle.

FIG. 6A is a schematic side view of an optoelectronic module 100 of thissort, in accordance with an embodiment of the present invention. A laserdie 104, serving as the transmitter, and a driver chip 106 are placed ona silicon optical bench (SiOB) 102. Laser die 104 in this embodiment isan edge-emitting device, but in other embodiments, surface-emittingdevices may be used, as described hereinbelow. The laser output beamfrom die 104 reflects from a turning mirror 108 and is collimated by alens 110. A prism 112 may be placed in the laser beam in order to alignits beam axis with that of the receiver. Prism 112 may be made as amonolithic part of lens 110, and typically covers a small fraction ofthe area of the lens (such as 1/10 of the lens clear aperture).

The laser typically has significantly lower numerical aperture (NA) thanlens 110. Therefore, the laser beam at the lens will be much narrowerthan the return beam captured by the lens. (Optionally, a ball lens maybe placed on SiOB 102 between laser die 104 and mirror 108, as shown inFIG. 8A, for example, in order to reduce the numerical aperture of thebeam that is seen by lens 110. Additionally or alternatively, anadditional lens element may be added to lens 110 to collimate theoutgoing laser beam, similar to the lens element shown in FIG. 6B.) Theoutput laser beam from module 100 strikes the scanning mirror, whichscans the beam over the scene of interest.

Light returned from the scene via the scanning mirror is collected bylens 110, which focuses the light onto an avalanche photodiode (APD) die114 on bench 102. The output of the APD is amplified by a transimpedanceamplifier (TIA) 116, as explained above. Alternatively, other sorts ofdetectors and amplifiers may be used in module 100 (and in thealternative module designs that are described below), as long as theyhave sufficient sensitivity and speed for the application at hand. Lens110 may present different or similar collimation properties to laser andAPD, since transmission and reception use different portions of thelens.

Lens 110 may be produced by means of wafer-level optics or molding ofpolymeric materials or glass, for example. Such a lens may have “legs,”which create the side walls of module 100, thus sealing the module.Assembly of module 100 may be performed at wafer level, wherein a waferof SiOB with mounted dies is bonded to a wafer of lenses, and thendiced. Alternatively, a spacer wafer with appropriately-formed cavitiesmay be bonded to the SiOB wafer, and the lens wafer bonded on top of it.Further alternatively, the assembly may be carried out using singulatedsilicon optical benches and lenses. In any case, the entire module 100will have the form of a hollow cube, typically about 5-8 mm on a side.(Alternatively, the micro-optical bench and the components thereon maybe sealed with a transparent cap, and lens 110 with other associateoptics may then be assembled as a precision add-on, in both thisembodiment and the other embodiments described below).

FIG. 6B is a schematic side view of an optoelectronic module 117, inaccordance with another embodiment of the present invention. Module 117is similar to module 100, except that in module 117 a mirror 118 thatreflects the beam from laser die 104 is angled at approximately 45°, andthus the laser beam is reflected along an axis parallel to the opticalaxis of the received light (referred to herein as the “collection axis”)that is defined by lens 110 and APD die 114. (The collection axis is amatter of design choice, and can be slanted relative to the plane of APDdie 114.) In this configuration, prism 112 is not needed, but anadditional lens element 119 may be added, by molding element 119together with lens 110, for example, to collimate the outgoing laserbeam. As long as the projected beam from laser die 104 and thecollection axis of APD die 114 are parallel, the offset between the axesin this embodiment has no substantial effect on system performance.

The angles of mirrors 108 and 118 in the foregoing figures are shown byway of example, and other angles, both greater than and less than 45°,may alternatively be used. It is generally desirable to shield APD die114 from any stray light, including back-reflected light from the beamemitted by laser die 104. For this reason, the sharper reflection angleof mirror 118 (by comparison with mirror 108 in the embodiment of FIG.6A) is advantageous. In an alternative embodiment (not shown in thefigures) even a sharper reflection angle may be used, with suitableadaptation of the corresponding projection optics for the laser beam.For example, SiOB 102 or alternatively, a silicon spacer wafer (notshown) placed on top of SiOB 102, may comprise a (100) silicon crystal,and may be wet-etched along the (111) plane and then coated with metalor with a dielectric stack to form a mirror at an inclination of 54.74°.In this case, lens 110 may be slanted or otherwise configured to focusoff-axis onto APD die 114. Optionally, module 100 or 117 may alsoinclude light baffling or other means (not shown) for shielding the APDdie from stray reflections of the laser beam. Alternatively oradditionally, for angles greater than 45°, APD die 114 may be placedbehind laser die 104, rather than in front of it as shown in thefigures.

FIG. 7 is a schematic side view of an optoelectronic module 120, inaccordance with still another embodiment of the present invention. Thismodule is similar to modules 100 and 117, except that the transmitterelements (laser die 104 and driver 106) are placed on a pedestal 122,and a beamsplitter 124 is mounted over SiOB 102 in order to align thetransmitted and received beams. Beamsplitter 124 may comprise a small,suitably coated region on a transparent plate 126, which is orienteddiagonally in module 120. When laser die 104 is configured to output apolarized beam, beamsplitter 124 may be polarization dependent, so as toreflect the polarization direction of the laser beam while passing theorthogonal polarization, thereby enhancing the optical efficiency of themodule.

FIGS. 8A and 8B are schematic side views of an optoelectronic module130, in accordance with yet another embodiment of the present invention.The view shown in FIG. 8B is rotated by 90° relative to that in FIG. 8A,so that items that are seen at the front of the view of FIG. 8A are onthe left side of FIG. 8B. This embodiment differs from the precedingembodiments in that the transmitted and received beams are separatewithin module 130 and are aligned at the exit from the module by a beamcombiner 142 mounted over the substrate of the module.

The illumination beam emitted by laser die 104 is collimated by a balllens 134, which is positioned in a groove 135 formed in SiOB 102. Groove135 may be produced in silicon (and other semiconductor materials) withlithographic precision by techniques that are known in the art, such aswet etching. Alternatively or additionally, the ball lens may beattached directly to SiOB by an accurate pick-and-place machine, evenwithout groove 135. A turning mirror 136 reflects the collimated beamaway from SiOB 102 and through a cover glass 137, which protects theoptoelectronic components in module 130. As ball lens 134 typicallyachieves only partial collimation, a beam expander 138 may be used toexpand the laser beam, typically by a factor of three to ten, and thusenhance its collimation. Although beam expander 138 is shown here as asingle-element optical component, multi-element beam expanders mayalternatively be used. The design of module 130 is advantageous in thatit can be assembled accurately without requiring active alignment, i.e.,assembly and alignment can be completed to within fine tolerance withoutactually powering on laser die 104.

The collimated beam that is output by beam expander 138 is turned by areflector 144 in beam combiner 142, and is then turned back outwardtoward the scanning mirror by a beamsplitter 146. Assuming laser die 104to output a polarized beam, beamsplitter 146 may advantageously bepolarization-dependent, as explained above with reference to FIG. 7. Thecollected beam returned from the scanning mirror passes throughbeamsplitter 146 and is then focused onto APD 114 by a collection lens140. The collection lens may have an asymmetrical, elongated shape, asshown in FIGS. 8A and 8B, in order to maximize light collectionefficiency within the geometrical constraints of module 130.

Although beam combiner 142 is shown in FIG. 8B as a single prismaticelement, other implementations may alternatively be used. For example,the beam combining function may be performed by two separate angledplates: a reflecting plate in place of reflector 144 and a beamsplittingplate in place of beamsplitter 146.

FIG. 9 is a schematic side view of a beam combiner 150, which can beused in place of beam combiner 142 in accordance with another embodimentof the present invention. Beam combiner 150 comprises a transparentsubstrate 152, made of glass, for example, with a reflective coating154, taking the place of reflector 144, and a beamsplitting coating 156(typically polarization-dependent), taking the place of beamsplitter146. An anti-reflection coating 158 may be applied to the remainingareas of the front and rear surfaces of substrate 152, through which theprojected and collected beams enter and exit combiner 150. The design ofbeam combiner 150 is advantageous in terms of simplicity of manufactureand assembly.

FIGS. 10A and 10B are schematic side views of an optoelectronic module160, in accordance with a further embodiment of the present invention.The two views are rotated 90° relative to one another, such thatelements at the front of FIG. 10A are seen at the right side in FIG.10B. The principles of the design and operation of module 160 aresimilar to those of module 130 (FIGS. 8A/B), except that no ball lens isused for collimation in module 160. A collimation lens 164 for the beamthat is transmitted from laser die 104 and a collection lens 166 for thebeam that is received from the scanning mirror are mounted in this casedirectly on a cover glass 162 of the module. The beam axes of thetransmitted and received beams are typically aligned by a beam combiner(not shown in these figures), as in the embodiment of FIGS. 8A/B.

If lenses 164 and 166 have tight manufacturing tolerances, they can beassembled in place using machine vision techniques to align theiroptical centers with the appropriate axes of module 160, on top of coverglass 162. Such miniature lenses, however, typically have largemanufacturing tolerances, commonly on the order of 1-5%, particularlywhen the lenses are mass-produced in a wafer-scale process. Suchtolerance could, if not measured and accounted for, result in poorcollimation of the beam from laser die 104.

To avoid this sort of situation, the actual effective focal length (EFL)of collimation lens 164 can be measured in advance. For example, whenlenses 164 are fabricated in a wafer-scale process, the EFL of each lenscan be measured precisely at the wafer level, before module 160 isassembled. The distance of laser die 104 from turning mirror 136 on thesubstrate in each module 160 can then be adjusted at the time offabrication, as illustrated by the horizontal arrow in FIG. 10A, tomatch the measured EFL of the corresponding lens 164. The laser die isthen fixed (typically by glue or solder) in the proper location. Thisadjustment of the location of the laser die is well within thecapabilities of existing pick-and-place machines, which may similarly beused to center lens 164 accurately on cover glass 162 above turningmirror 136. As a result, the components of module can be assembled andaligned without actually powering on and operating laser die 114, i.e.,no “active alignment” is required.

A pick-and-place machine may similarly be used to position collectionlens 166. Because of the less stringent geometrical constraints of thecollected beam and the relatively large size of APD 114, however, EFLvariations of the collection lens are less critical. Thus, as analternative to mounting collection lens 166 on cover glass 162 as shownin FIGS. 10A and B, the collection lens may be assembled onto module 160after fabrication, together with the beam combiner.

Alternatively, as noted earlier, modules based on the principles of theembodiments described above may be fabricated on other sorts ofmicro-optical substrates, such as ceramic or glass substrates. Ceramicmaterials may be advantageous in terms of electrical performance.

In other alternative embodiments (not shown in the figures), thetransmitting and receiving portions of the optoelectronic module may bemounted separately on two different micro-optical benches. This approachmay be advantageous since the requirements for the receiver are highbandwidth, low loss for high-frequency signals, and low price, while forthe transmitter the main requirement are thermal conductivity, as wellas hermetic sealing for reliability of the laser diode.

Beam Transmitters and Modules Based on Surface Emitters

Reference is now made to FIGS. 11A-C, which schematically illustrate abeam transmitter 170, in accordance with an embodiment of the presentinvention. FIG. 11A is a side view of the entire beam transmitter, whileFIGS. 11B and 11C are side and rear views, respectively, of a beamgenerator 172 that is used in transmitter 170. Transmitter 170 is suitedparticularly for use in optoelectronic modules that may be integrated inan optical scanning head of the type described above, and modules ofthis sort are described further hereinbelow. Transmitters of this type,however, may also be used in other applications in which a compactsource is required to generate an intense, well-controlled output beam.

Beam generator 172 comprises an array of surface-emitting devices 178,such as vertical-cavity surface-emitting lasers (VCSELs). The beamsemitted by devices 178 are collected by a corresponding array ofmicrolenses 176, which direct the beams toward a collimation lens 175.Devices 178 and microlenses 176 may conveniently be formed on opposingfaces of a transparent optical substrate 180, such as a suitablesemiconductor wafer, such as a GaAs wafer. (GaAs has an optical passbandthat begins at about 900 nm, i.e., it is transparent at wavelengthslonger than about 900 nm, and will thus pass the radiation at suchwavelengths that is emitted by devices 178 on the back side of substrate180.) The thickness of substrate 180 is typically about 0.5 mm, althoughsmaller or larger dimensions may alternatively be used. As shown mostclearly in FIG. 11C, the locations of devices 178 are offset inwardlyrelative to the centers of the corresponding microlenses 176, thusgiving rise to an angular spread between the individual beamstransmitted by the microlenses.

FIG. 11D is a schematic side view of a beam generator 182, in accordancewith an alternative embodiment of the present invention. In thisembodiment, surface emitting devices 178 are formed on the front side ofa substrate 183, which may be connected to an underlying substrate bywire bonds 185. Microlenses 176 are formed on a separate transparentblank 184, such as a glass blank, which is then aligned with and gluedover devices 178 on substrate 183. The design of beam generator 182 isthus appropriate when devices 178 are designed to emit at shorterwavelengths, to which the substrate is not transparent. For reasons ofoptical design and heat dissipation, substrate 183 and blank 184 areeach typically about 0.25 mm thick, although other dimensions maysimilarly be used.

FIGS. 12A-C schematically illustrate a beam transmitter 186, inaccordance with another embodiment of the present invention. Again, FIG.12A is a schematic side view of the entire beam transmitter, while FIGS.12B and 12C are schematic side and rear views, respectively, of a beamgenerator 188 that is used in transmitter 186. Beam generator 188differs from beam generator 172 in that the locations of devices 178 inbeam generator 188 are offset outwardly relative to the centers of thecorresponding microlenses 176, as shown in FIG. 12C. As a result, theindividual beams transmitted by microlenses 176 converge to a focalwaist, before again spreading apart, as shown in FIG. 12A.

Surface-emitting devices 178 in beam transmitters 170 and 186 may bedriven individually or in predefined groups in order to change thecharacteristics of the beam that is output by lens 175. For example, allof devices 178 may be driven together to give a large-diameter, intensebeam, or only the center device alone or the central group of sevendevices together may be driven to give smaller-diameter, less intensebeams. Although FIGS. 11C and 12C show a particular hexagonalarrangement of the array of surface-emitting devices, otherarrangements, with larger or smaller numbers of devices, in hexagonal orother sorts of geometrical arrangements, may alternatively be used.

FIG. 13 is a schematic side view of an optoelectronic module 190 thatincorporates beam generator 172 (FIGS. 11B/C), in accordance with anembodiment of the present invention. This module, as well as thealternative modules that are shown in FIGS. 14 and 15, may be used inconjunction with a scanning mirror and other components in producing thesorts of optical scanning heads that are described above. The modules ofFIGS. 13-15 may alternatively be used in other applications requiring acompact optical transmitter and receiver with coaxial transmitted andreceived beams.

In module 190, beam generator 172 (as illustrated in FIGS. 11B/C) ismounted on a micro-optical substrate 192, such as a SiOB, along with areceiver 194, which contains a suitable detector, such as an APD, forexample, as described above. A beam combiner 196 combines thetransmitted and received beams, which pass through lens 175 toward thescanning mirror (not shown in FIGS. 13-15). Beam combiner 196 in thisembodiment comprises a glass plate, with an external reflective coating198 over most of its surface, other than where the transmitted andreflected beams enter and exit the plate. The beam transmitted by beamgenerator 172 enters the beam combiner through a beamsplitter coating200, which may be polarization-dependent, as explained above, and exitsthrough a front window 202, which may be anti-reflection coated.

The received beam collected by lens 175 enters beam combiner 196 throughwindow 202, reflects internally from beamsplitter coating 200 andreflective coating 198, and then exits through a rear window 204 towardreceiver 194. The thickness of the beam combiner plate is chosen to givethe desired optical path length (which is longer than the back focallength of lens 175 would be otherwise). To reduce the amount of straylight reaching the receiver, window 204 may be located at the focus oflens 175 and thus can be made as small as possible. Window 204 (as wellas window 202) may have a narrowband filter coating, so that ambientlight that is outside the emission band of beam generator 172 isexcluded.

FIG. 14 is a schematic side view of an optoelectronic module 210 thatincorporates beam generator 188 (FIGS. 12B/C), in accordance withanother embodiment of the present invention. A beam combiner 212 in thiscase comprises a glass plate with a reflective coating 214 to fold thebeam transmitted by beam generator 188 and a beamsplitter coating 216where the transmitted and received beams are combined at the rearsurface of the glass plate. Beamsplitter coating 216 may also beoverlaid or otherwise combined with a narrowband filter on the path toreceiver 194, as in the preceding embodiment. The thickness of beamcombiner 212 in this embodiment is chosen to give the desired pathlength of the beam transmitted by beam generator 188, which has a focalwaist inside the beam combiner.

Although in FIG. 14 the transmitted and received beams have roughlyequal apertures, the aperture of the transmitted beam may alternativelybe made smaller than that of the received beam. In this latter case, thediameter of beamsplitter coating 216 need be no larger than thetransmitted beam aperture. Outside this aperture, the glass plate mayhave a reflective coating, so that the received beam can reach receiver194 without loss of energy due to the beamsplitter.

FIG. 15 is a schematic side view of an optoelectronic module 220 thatincorporates beam generator 188, in accordance with yet anotherembodiment of the present invention. In this embodiment, a bifocal lens220 has a central zone that collects and collimates a beam 230transmitted by beam generator 188, with a relatively small aperture anda short focal length. The peripheral zone of lens 220 collects andfocuses a beam 232 onto receiver 194 with a larger aperture and longerfocal length. Thus, the area of lens 220, and concomitantly the area ofthe scanning mirror, is divided into a small, central transmit zone anda larger, surrounding receive zone.

A beam combiner 224 used in this embodiment has a front window 226 thatis large enough to accommodate beam 232, but a much smaller window 228in reflective coating 198 on the rear side. Window 228 need only belarge enough to accommodate the narrow beam transmitted by beamgenerator 188. Consequently, most of the energy in beam 232 is reflectedinside the beam combiner by reflective coating 198 and reaches receiver194 via rear window 204 (which may be made small and coated with anarrowband coating, as described above). There is no need for abeamsplitter coating in this embodiment, and beam generator 188 maytherefore comprise unpolarized, multimode surface-emitting devices.

Alternative Embodiments

Although the embodiments described above use a single detector element(such as an APD) to detect scanned light that is returned from thescene, other sorts of detector configurations may alternatively be used.For example, a linear array of photodetectors may be used for thispurpose, in which case the mirror used in collecting light from thescene need scan in only a single direction, perpendicular to the axis ofthe array. This same one-dimensional scanning mirror can be used toproject a line of laser radiation onto the instantaneous field of viewof the detector array. Such a system is also capable of zoomfunctionality, which can be achieved on one axis by changing the scanpattern and amplitude along the one-dimensional scan.

As another alternative, a 2D matrix of photo-detectors with a stationarycollection lens may be used to collect scanned light from the scene,covering the entire field of view so that no mechanical scanning of thereceiver is needed. The transmitting laser is still scanned in twodimensions using a MEMS mirror, for example. The pixel positions in theresulting depth map are determined by the high precision of the scan,rather than the relatively lower resolution of the detector matrix. Thisapproach has the advantages that alignment is easy (since the detectormatrix is stationary); the scanning mirror can be small since it is notused to collect light, only to project the laser; and the collectionaperture can be large. For example, using a collection lens of 6 mmfocal length and detectors with a pitch of 0.1 mm, the field of view ofeach detector is approximately 1°. Thus, 60×60 detectors are needed fora 60° field of view. The resolution, as determined by the scan accuracy,however, can reach 1000×1000 points.

Another variant of this scheme may use multiple beams (created, forexample, by a beamsplitter in the optical path of the transmitted beamafter it reflects from the MEMS mirror). These beams create simultaneousreadings on different detectors in the matrix, thus enablingsimultaneous acquisition of several depth regions and points. It isdesirable for this purpose that the beams themselves not overlap and befar enough apart in angular space so as not to overlap on any singleelement of the matrix.

More generally, although each of the different optoelectronic modulesand other system components described above has certain particularfeatures, this description is not meant to limit the particular featuresto the specific embodiments with respect to which the features aredescribed. Those skilled in the art will be capable of combiningfeatures from two or more of the above embodiments in order to createother systems and modules with different combinations of the featuresdescribed above. All such combinations are considered to be within thescope of the present invention.

It will thus be appreciated that the embodiments described above arecited by way of example, and that the present invention is not limitedto what has been particularly shown and described hereinabove. Rather,the scope of the present invention includes both combinations andsubcombinations of the various features described hereinabove, as wellas variations and modifications thereof which would occur to personsskilled in the art upon reading the foregoing description and which arenot disclosed in the prior art.

1. Mapping apparatus, comprising: a transmitter, which is configured toemit a beam comprising pulses of light; a scanner, which is configuredto scan the beam, within a predefined scan range, over a scene; areceiver, which is configured to receive the light reflected from thescene and to generate an output indicative of a time of flight of thepulses to and from points in the scene; and a processor, which isconfigured to process the output of the receiver during a first scan soas to generate a first 3D map of the scene, and to select a windowwithin the scan range to scan preferentially during a second scanresponsively to a feature of the first 3D map, and to drive the scannerto scan the beam over the selected window during the second scan at aframe rate that is higher than during the first scan, and to process theoutput of the receiver during the second scan so as to generate a second3D map of a part of the scene that is within the selected window.
 2. Theapparatus according to claim 1, wherein the processor is configured toselect a different window to scan in each scan of the beam.
 3. Theapparatus according to claim 1, wherein the first scan covers the entirescan range of the scanner.
 4. The apparatus according to claim 1,wherein the processor is configured to identify an object in the first3D map, and to define the window so as to contain the identified object.5. The apparatus according to claim 4, wherein the object comprises atleast a part of a body of a user of the apparatus, and wherein theprocessor is configured to identify the part of the body responsively toa gesture made by the user during the first scan.
 6. The apparatusaccording to claim 1, wherein the processor is configured to drive thescanner to scan the selected window with a resolution that is enhancedrelative to the first scan.
 7. The apparatus according to claim 1,wherein for at least some scans, the selected window is not centeredwithin the predefined scan range.
 8. The apparatus according to claim 1,wherein the scanner comprises at least one micromirror, and wherein thetransmitter is configured to direct the beam to reflect from the atleast one micromirror toward the scene.
 9. The apparatus according toclaim 8, wherein the receiver comprises a detector, which is configuredto receive the reflected light from the scene via the at least onemicromirror.
 10. The apparatus according to claim 1, and comprising abeamsplitter, which is patterned with a polarizing reflective coatingover only a part of a surface of the beamsplitter, and is positioned sothat the patterned part of the surface intercepts the beam from thetransmitter and reflects the beam toward the scanner, while permittingthe reflected light to pass through the beamsplitter and reach thereceiver.
 11. The apparatus according to claim 10, wherein thebeamsplitter comprises a bandpass coating on a reverse side of thebeamsplitter, configured to prevent light outside an emission band ofthe transmitter from reaching the receiver.
 12. The apparatus accordingto claim 1, wherein the processor is configured to variably control apower level of the pulses emitted by the transmitter responsively to alevel of the output from the receiver in response to one or moreprevious pulses.
 13. A method for mapping, comprising: operating ascanner so as to scan a beam comprising pulses of light, within apredefined scan range, over a scene; receiving the light reflected fromthe scene and generating an output indicative of a time of flight of thepulses to and from points in the scene; processing a first outputreceived during a first scan of the beam so as to generate a first 3Dmap of the scene; selecting a window within the scan range to scanpreferentially during a second scan responsively to a feature of thefirst 3D map; driving the scanner during the second scan so as to causethe beam to scan over the selected window at a frame rate that is higherthan during the first scan; and processing the output of the receiverduring the second scan so as to generate a second 3D map of a part ofthe scene that is within the selected window.
 14. The method accordingto claim 13, wherein the first scan covers the entire scan range. 15.The method according to claim 13, wherein selecting the window comprisesidentifying an object in the first 3D map, and defining the window so asto contain the identified object.
 16. The method according to claim 15,wherein the object comprises at least a part of a body of a user of themethod, and wherein identifying the object comprises identifying thepart of the body responsively to a gesture made by the user during thefirst scan.
 17. Mapping apparatus, comprising: a laser, which isconfigured to emit a beam comprising pulses of light; a receiver, whichis configured to receive the light reflected from the scene and togenerate an output indicative of a time of flight of the pulses to andfrom points in the scene; and a processor, which is coupled to processthe output of the receiver so as to generate a 3D map of the scene,while controlling a power level of the pulses emitted by the transmitterresponsively to a level of the output from the receiver in response toone or more previous pulses.
 18. The apparatus according to claim 17,wherein the processor is configured to control the power level of thepulses so as to reduce variations in an intensity of the reflected lightthat is received from different parts of the scene.
 19. The apparatusaccording to claim 17, wherein the one or more previous pulses comprisescout pulses emitted by the transmitter in order to assess and adjustthe power level.
 20. The apparatus according to claim 17, wherein thereceiver comprises a two-dimensional matrix of photo-detectors with astationary collection lens.